const getters = {
  sidebar: state => state.app.sidebar,
  sidebarRouters: state => state.permission.sidebarRouters,
  pageComponentTotalMap: state => {
    let map = {}
    let cList = state.page.pageData.componentList || []
    let cName
    cList.forEach(c => {
      cName = c.data.component
      if (map[cName]) {
        map[cName] += 1
      } else {
        map[cName] = 1
      }
    })
    return map
  },
}
export default getters
